{% extends "layout.html" %}

{% block title %}Détail de l'option fixe{% endblock %}

{% block content %}



<form method="post" class="form-horizontal">
<div class="row">
	
	 <!-- Première colonne -->
	<div class="span12">
	
	  <fieldset>
		<legend>Informations sur l'option - (Basée sur l'option {{ha_option.nom}})</legend>
		<input name="id" type="hidden" value="{{offre.id}}" class="uneditable-input"/>
	
    {% if not(session.niveauAuth=='6') and not(session.niveauAuth=='7') and not(session.niveauAuth=='9') %}
      <div class="control-group">
		<label class="control-label" for="code_achat">Option Achat</label>
        <div class="controls">
		<div class="input-prepend">
           <select name="code_achat" size="1" />
           {% for liste_option_ha in liste_options_ha %}
				  <option value="{{liste_option_ha.id}}" {% if offre.id_ha == liste_option_ha.id %}selected{% endif %}>{{liste_option_ha.nom}}</option>
            {% endfor %}
				</select>
		</div>
	  </div>
	  </div>
	  {% else %}
      		<input name="code_achat" type="hidden" value="{{offre.id_ha}}"/>
	  {% endif %}
      
	  <div class="control-group">
		<label class="control-label" for="code_article">Code Article</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="code_article" type="text" value="{{offre.code_article}}"/> 
		</div>
	  </div>
	  </div>
      
      <div class="control-group">
		<label class="control-label" for="type">Type </label>
        <div class="controls">
			<select name="type" id="type"/>
           	<option value="">Choississez...</option>
			  <option value="vga/num" {% if offre.type == 'vga/num' %}selected{% endif %}>vga/num</option>
              <option value="vga" {% if offre.type == 'vga' %}selected{% endif %}>vga</option>
              <option value="voip" {% if offre.type == 'voip' %}selected{% endif %}>voip</option>
              <option value="xdsl" {% if offre.type == 'xdsl' %}selected{% endif %}>xdsl</option>
			</select>		
        </div>
	  </div>
      
      <div class="control-group">
		<label class="control-label" for="nom">Nom</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="nom" type="text" value="{{offre.nom}}"/> 
		</div>
	  </div>
	  </div>
      {% if not(session.niveauAuth=='7') %}
{% if offre.type != 'xdsl' %}       
      <div class="control-group">
		<label class="control-label" for="temps_min">Temps</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="temps_min" type="text" value="{{offre.temps_min}}"/> 
		</div>
	  </div>
	  </div>
{% endif %}      
      	{% endif %}
      <div class="control-group">
		<label class="control-label" for="prix">Prix sans engagement</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="pv0m" type="text" value="{{offre.pv0m}}"/> 
		</div>
	  </div>
	  </div>
	  
	     <div class="control-group">
		<label class="control-label" for="pv12m">Prix 12M</label>
		 <div class="controls">
         <div class="input-prepend">
		   <input name="pv12m" type="text" value="{{offre.pv12m}}"/> 
		</div>
        </div>
	  </div>
	   <div class="control-group">
		<label class="control-label" for="pv24m">Prix 24M</label>
		 <div class="controls">
         <div class="input-prepend">
		   <input name="pv24m" type="text" value="{{offre.pv24m}}"/> 
		</div>
        </div>
	  </div>
	  
	   <div class="control-group">
		<label class="control-label" for="pv36m">Prix 36M</label>
		 <div class="controls">
         <div class="input-prepend">
		   <input name="pv36m" type="text" value="{{offre.pv36m}}"/> 
		</div>
        </div>
        </div>
        
        <div class="control-group">
		<label class="control-label" for="pv36m">Prix 48M</label>
		 <div class="controls">
         <div class="input-prepend">
		   <input name="pv48m" type="text" value="{{offre.pv48m}}"/> 
		</div>
        </div>
        </div>
	  
       {% if not(session.niveauAuth=='7') %}
{% if offre.type != 'xdsl' %}           
  <div class="control-group">
			<label class="control-label" for="horaires">Horaires</label>
			<div class="controls">
			   <select name="horaires" size="1" />
	           	<option value="">Selectionnez...</option>
				  <option value="24/24" {% if offre.horaires == "24/24" %}selected{% endif %}>24h sur 24</option>
				  <option value="8/19" {% if offre.horaires == "8/19" %}selected{% endif %}>8h à  19h</option>
	              <option value=""> </option>
	
				</select>
			</div>
		  </div>
          	
	      <div class="control-group">
			<label class="control-label" for="jours">Jours</label>
		<div class="controls">
			   <select name="jours" size="1" />
	           	<option value="">Selectionnez...</option>
				  <option value="7/7" {% if offre.jours == "7/7" %}selected{% endif %}>7 jours sur 7</option>
				  <option value="5/7" {% if offre.jours == "5/7" %}selected{% endif %}>5 jours sur 7</option>
	              <option value=""> </option>
	
				</select>
			</div>
		  </div>
		  
		  <div class="control-group">
      <label class="control-label">Type de forfait</label>
      	<div class="controls">
      		<label class="checkbox inline" for="fixe">
     			<input type="checkbox" id="fixe" name ="fixe" value="x" {% if offre.fixe == "x" %}checked{% endif %}> Fixe
 			</label>
			<label class="checkbox inline"for="mobile">
  				<input type="checkbox" id="mobile" name ="mobile" value="x" {% if offre.mobile == "x" %}checked{% endif %}> Mobile
			</label>
		</div>  
	  </div>
      
      <div class="control-group">
			<label class="control-label" for="international">Pays</label>
			<div class="controls">
			   <select name="international"/>
	           	<option value="">Selectionnez...</option>
                {% for pays in pays %}
				<option value="{{pays.id}}" {% if offre.id_international == pays.id %}selected{% endif %}>{{pays.nom}}</option>
				{% endfor %}
				</select>
			</div>
		  </div>
{% else %}
    			<input name="temps_min" type="hidden" value=""/> 
                <input name="jours" type="hidden" value=""/> 
                <input name="horaires" type="hidden" value=""/> 
                <input name="fixe" type="hidden" value=""/> 
                <input name="mobile" type="hidden" value=""/> 
                <input name="pays" type="hidden" value=""/> 
{% endif %}          
     {% endif %}

   
		<div class="form-actions">
                      
                      <button type="submit" class="btn btn-primary" name="action" value="update">Mise à jour de l'offre</button>
                      
   		<div class="btn-group">
					  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						Actions
						<span class="caret"></span>
					  </a>

						<ul class="dropdown-menu">
							
                            <li><a href="ve-option-fixe"><i class="icon-eye-open"></i> Afficher la liste des offres</a></li>
                         <li class="divider"></li>
							<li><a href="ve-option-fixe-creation"><i class="icon-shopping-cart"></i>Créer une nouvelle offre </a></li>
							
					  </ul>
		</div>
		</div>
	</div>
</div>   
	
</form>

{% endblock %}
	
